package org.wisigoth.chat.client.mockup;

import java.util.HashMap;
import java.util.Map;

public class ValidUsers {

	private static Map<String, String> validUsers = createvalidUsers();

	public static boolean userExists(String username) {
		return validUsers.keySet().contains(username);
	}

	public static void createUser(String username, String password) {
		validUsers.put(username, password);
	}

	public static Map<String, String> createvalidUsers() {
		Map<String, String> result = new HashMap<String, String>();
		result.put("wiscarol", "ouik");
		result.put("java", "ouik");
		result.put("tof", "ouik");
		result.put("therese", "ouik");
		result.put("torjon", "ouik");
		return result;
	}

	public static String getpassword(String username) {
		return validUsers.get(username);
	}

}
